// $.ajax({
//     type:'',
//     url:'',
//     data:{},
//     success:function (data){
            var data='1234567.8900';
            data=splitK(data);
            var html='';
            // for(var p of data){
            html+=` ${data}`
// }
            $('#extractable>span').html(html);
//     }
// })

$(".btn").click(()=>{
    var phone=$('#phone').val().trim();
    var uname=$('#uname').val().trim();
    var card=$('#card').val().trim();
    var open_bank=$('#open_bank').val().trim();
    var extractable= tonum($('#extractable>span').html());
    var money=parseFloat($('#money').val().trim());
    if(!money){layer.msg("请输入提现金额",{time:1500})}
    else if(money>extractable){layer.msg("提现金额不能超过现有金额",{time:1500})}
    else if(!uname){layer.msg("请输入持卡人姓名",{time:1500})}
    else if(!card){layer.msg("请输入卡号",{time:1500})}
    else if(!open_bank){layer.msg("请输入开户行",{time:1500})}
    else if(!phone){layer.msg("请输入预留手机号",{time:1500})}
    else{
        $.ajax({
            type:'post',
            url:'',
            data:{phone:phone,money:money,uname:uname,card:card,open_bank:open_bank},
            success:function (data){
                layer.msg("提现正在处理中",{time:1500});
                // location.href='index.html'
            },
            error:function () {

            }

        })
    }
})